/*
============================================================================
 Name        : sd_platform.h
 Author      : Jian
 Version     :
 Copyright   : GPL
 Description : sd_platform.h - header file
============================================================================
*/

#ifndef SD_PLATFORM_H
#define SD_PLATFORM_H

/* INCLUDES */
#include "dd_define.h"
#include "sd_file.h"
#include "sd_lock.h"
#include "sd_network.h"
#include "sd_audio.h"
#include "sd_timer.h"
#include "sd_thread.h"
#include "sd_player.h"

__DD_BEGIN_DECLS

#define DD_MAX_FILE_NAME_LEN    256
#define DD_MAX_TIME_STR_LEN     64
#define DD_MAX_THREAD_INFO_LEN  64

#define DD_FILE_ATTR_SEP        0x20
#define DD_LOCAL_FILE_HEAD      "file://"
#define DD_REMOTE_FILE_HEAD     "remote://"

#ifdef __ANDROIDOS__
#define DD_FILE_SPLASH          '/'
#else
#define DD_FILE_SPLASH          '\\'
#endif

typedef struct {
    DD_UINT second; 
    DD_UINT usecond ;
}sd_time;


void sd_env_init() ;

void sd_send_msg_to_ui(int msgId, void* msgPtr, int msgLen) ;

/* must return with the last directory slash like / or \ */
void sd_get_log_path(char path[DD_MAX_FILE_NAME_LEN + 1]) ;

void sd_get_time_string(char str[DD_MAX_TIME_STR_LEN + 1]) ;

void sd_get_thread_info(char threadInfo[DD_MAX_THREAD_INFO_LEN + 1]) ;

void sd_sys_log(DD_UINT priority, const char* logStr, ...) ;

void sd_get_ini_file(char* fileName) ;

int  sd_get_cur_time(sd_time* time) ;

int  sd_sleep(int second) ;

int  sd_get_cpu_count() ;

__DD_END_DECLS

#endif  /* SD_PLATFORM_H */

/* End of File */
